﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Demo
{
    class Program
    {
        static void Main(string[] args)
        {
            //定义常量
            const int R = 4;
            //圆的面积
            double S = Math.PI * R * R;
            Console.WriteLine("圆的面积为："+S);

            //if  else语句 
            while (true)
            {

            
               
            Console.WriteLine("欢迎进入学习通");
            Console.WriteLine("请输入你的账号");
            string Id = Console.ReadLine(); 
            if (string.Equals(Id, "amdin"))
            {
                Console.WriteLine("请输入密码");
                string Pwd = Console.ReadLine();
                if (string.Equals(Pwd, "123456")) 
                {
                    Console.WriteLine("欢迎进入学习通");
                        break;
                }
                  else if (string.Equals(Pwd, ""))
                {
                    Console.WriteLine("密码不能为空");
                }
                else
                {
                    Console.WriteLine("输入的密码不正确");
                }
            }
            else if (string.Equals(Id, ""))
            {
                Console.WriteLine("账号不能为空");
                  
            }
            else
            {
                Console.WriteLine("该账号不存在");
            }
            }


            //switch  判断星期
            Console.WriteLine("请输入常数 判断星期几");
            int week = int.Parse(Console.ReadLine());
            switch (week)
            {
                case 1:
                    Console.WriteLine("星期一");
                    break;
                case 2:
                    Console.WriteLine("星期二");
                    break;
                case 3:
                    Console.WriteLine("星期三");
                    break;
                case 4:
                    Console.WriteLine("星期四");
                    break;
                case 5:
                    Console.WriteLine("星期五");
                    break;
                case 6:
                    Console.WriteLine("星期六");
                    break;
                case 7:
                    Console.WriteLine("星期天");
                    break;
                default:
                    Console.WriteLine("世界末日");
                    break;
            }
            Console.ReadKey();
        }
    }
}
